<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="style.css"/>
    <script src="shoppingcar.js" type="module"></script>
</head>
<body>
    <div class="catbox">
        <table id="cartTable">
            <thead>
            <tr>
                <th><label>
                    <input class="check-all check" type="checkbox"/>&nbsp;&nbsp;全选</label></th>
                <th>商品</th>
                <th>单价</th>
                <th>数量</th>
                <th>小计</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            
            </tbody>
        </table>
        <div class="foot" id="foot">
            <label class="fl select-all"><input type="checkbox" class="check-all check"/>&nbsp;&nbsp;全选</label>
            <a class="fl delete" id="deleteAll" href="javascript:;">删除</a>
            <div class="fr closing" onclick="getTotal();">结 算</div>
            <input type="hidden" id="cartTotalPrice"/>
            <div class="fr total">合计：￥<span id="priceTotal">0.00</span></div>
            <div class="fr selected" id="selected">已选商品<span id="selectedTotal">0</span>件<span
                    class="arrow up">︽</span><span class="arrow down">︾</span></div>
            <div class="selected-view">
                <div id="selectedViewList" class="clearfix">
                    <div><span>取消选择</span></div>
                </div>
                <span class="arrow">◆<span>◆</span></span></div>
        </div>
    </div> 
</body>
<!-- <script> -->
<!-- // var user_id=location.search.split("=")[1]
// var tbody=document.getElementsByTagName("tbody")[0];
// $.ajax({url:"shoppingcar.php",
// data:{user_id:user_id},
// dataType:"json",
// callback:function(e){
//     var html="";
//     e.forEach(item => {
//         html +=` <tr class="tr1" productId=${item.goods_id}>
//                 <td class="checkbox"><input class="check-one check" type="checkbox"/></td>
//                 <td class="goods"><img src="http:${item.goods_pic}" alt=""/><span>${item.goods_name}</span></td>
//                 <td class="price">${item.goods_price}</td>
//                 <td class="count"><span class="reduce"></span>
//                     <input class="count-input" type="text" value="${item.goods_num}"/>
//                     <span class="add">+</span></td>
//                 <td class="subtotal">${item.goods_price*item.goods_num}</td>
//                 <td class="operation"><span class="delete">删除</span></td>
//             </tr>`
//     });
//     tbody.innerHTML=html
// }}) -->
<!-- </script> -->
</html>